package com.ngsky.ana;

import com.ngsky.ana.conf.AppConstants;
import com.ngsky.ana.index.Index;

import java.awt.*;
import java.io.File;

/**
 * @Author syx
 * @Desc
 * @Create 2020/6/14 14:55
 */
public class App {
    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                try {
                    File dir = new File(AppConstants.getDBPath());
                    if (!dir.exists()) {
                        dir.mkdirs();
                    }
                    File saveFile = new File(AppConstants.getDBFile());
                    if (!saveFile.exists() || !saveFile.isFile()) {
                        saveFile.createNewFile();
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }
                new Index();
            }
        });
    }
}
